# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd

if __name__ == '__main__':
    series = pd.Series(range(10, 15), index=np.random.randint(5, size=5))
    print series
    index = series.sort_index()
    print index
    print series.sort_index(ascending=False)
    frame = pd.DataFrame(np.random.rand(3, 4), index=np.random.randint(3, size=3), columns=['a', 'b', 'c', 'd'])
    print frame
    print frame.sort_index()
    print frame.sort_index(axis=1)
    print frame.sort_values(by='a')